import { Component, OnInit } from '@angular/core';

@Component({
  selector: 'app-stock-manger',
  templateUrl: './stock-manger.component.html',
  styleUrls: ['./stock-manger.component.css']
})
export class StockMangerComponent implements OnInit {
  private stocks: Array<Stock>;
  constructor() { }

  ngOnInit() {
    this.stocks = [
      new Stock(1 , 'xiaoming', 1.22, 4, '12312321', [ 'it ', '1231']),
      new Stock(1 , 'xiaoming', 1.22, 4, '12312321', [ 'it ', '1231']),
      new Stock(1 , 'xiaoming', 1.22, 2, '12312321', [ 'it ', ' 1231']),
      new Stock(1 , 'xiaoming', 1.22, 5, '12312321', [ 'it ', '1231']),
      new Stock(1 , 'xiaoming', 1.22, 2, '12312321', [ 'it ', '1231']),
      new Stock(1 , 'xiaoming', 1.22, 2, '12312321', [ 'it ', '1231']),
    ]
  }

}
export class Stock {
  constructor(public id: number,
              public name: string,
              public price: number,
              public rating: number,
              public desc: string,
              public categories: Array<string>) {

  }

}
